this.stopSpinning();
this.setHint(null);
+ if (oldStatus == AuthPromptStatus.VERIFICATION_FAILED)
+ this.emit('failed');
+
this.emit('reset');
},
cancel: function() {
this.reset();
+ this.emit('cancelled');
}
});
Signals.addSignalMethods(AuthPrompt.prototype);
factor: 0.5 }));
this._authPrompt = new AuthPrompt.AuthPrompt(new Gdm.Client(), AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
- this._authPrompt.connect('reset', Lang.bind(this, this._onReset));
+ this._authPrompt.connect('failed', Lang.bind(this, this._fail));
+ this._authPrompt.connect('cancelled', Lang.bind(this, this._fail));
this._authPrompt.setUser(this._user);
this._authPrompt.setPasswordChar('\u25cf');
this._authPrompt.nextButton.label = _("Unlock");
}
},
- _onReset: function() {
+ _fail: function() {
this.emit('failed');
},
_escape: function() {
- if (this.allowCancel) {
+ if (this.allowCancel)
this._authPrompt.cancel();
- this.emit('failed');
- }
},
_otherUserClicked: function(button, event) {